#pragma once
#include "sgobject.h"
#include "sgptr.h"
#include "graphics/GrVector.h"

class CSgRotate :
	public CSgObject
{
public:
	CSgRotate() {m_rx=m_ry=m_rz=m_degrees = 0.; m_child = NULL;}
	CSgRotate(double degrees, CGrVector rotationAxes)
	{
		//CSgRotate(degrees, rotationAxes.X(), rotationAxes.Y(), rotationAxes.Z());
		m_degrees = degrees;  
		m_rx= rotationAxes.X(); m_ry = rotationAxes.Y(); m_rz = rotationAxes.Z();
		m_child = NULL;
	}
	CSgRotate(double degrees, double rx, double ry, double rz) {m_degrees=degrees; m_rx=rx; m_ry=ry; m_rz = rz; m_child = NULL;}
	~CSgRotate();
	virtual void Render();
	void SetChild(CSgObject *p_child) {m_child = p_child;}

	void SetRotationAxis(double rx, double ry, double rz){m_rx = rx; m_ry = ry; m_rz = rz;}
	void SetDegrees(double degrees){m_degrees = degrees;}

private:
	CSgPtr<CSgObject> m_child;
	double m_degrees;
	double m_rx, m_ry, m_rz;
};
